home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / Behavior.script < prev    next >
Encoding:
Text File  |  2001-10-11  |  1.8 KB  |  78 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CBaseBehavior
  11. {
  12.   //
  13.   // *** CVehicleBehavior's properties:
  14.   //
  15.   // float MaxSpeed       - (read-only) maximum script-defined speed
  16.   // bool  DebugMode      - (write-only) unit displayed 10 times bigger
  17.   // bool  NonActiveMode  - behavior is non-active
  18.   // bool  ShowDebugInfo  - show behavior-specific debug information:
  19.   // int   ShowInfoStyle  - style of displayed debug information
  20.  
  21.  
  22.   void CBaseBehavior()
  23.   {
  24.     //#TODO: uncomment to completely disable behavior
  25.     // NonActiveMode = true;
  26.  
  27.     //#TODO: uncomment to make AI game objects highly visible
  28.     // DebugMode     = true;
  29.  
  30.     //#TODO: comment/uncomment to set default show info style
  31.     // ShowDebugInfo = true;
  32.     ShowInfoStyle = 0
  33.     //| BEHINF_ID
  34.       | BEHINF_ORDER
  35.     //| BEHINF_SCRIPT
  36.       | BEHINF_INFO
  37.       | BEHINF_PATH
  38.     //| BEHINF_TARGET
  39.       | BEHINF_CUSTOM
  40.     ;
  41.   }
  42.  
  43.   void OnStartBehavior()
  44.   {
  45.     StartBehavior();
  46.   }
  47.  
  48.   void ActivateBehavior( boolean _On)
  49.   {
  50.     NonActiveMode = !_On;
  51.   }
  52.  
  53.   void SetBehaviorDebugMode( boolean _On)
  54.   {
  55.     DebugMode = _On;
  56.   }
  57.  
  58.   void SetShowDebugInfo( boolean _On)
  59.   {
  60.     ShowDebugInfo = _On;
  61.   }
  62.  
  63.   void SetShowInfoStyle( int _Style)
  64.   {
  65.     ShowInfoStyle = _Style;
  66.   }
  67.  
  68.   void AddShowInfoStyle( int _Style)
  69.   {
  70.     ShowInfoStyle = ShowInfoStyle | _Style;
  71.   }
  72.  
  73.   void DelShowInfoStyle( int _Style)
  74.   {
  75.     ShowInfoStyle = ShowInfoStyle & (~_Style);
  76.   }
  77. }
  78.